using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Swimj.DomainLib.Entities;

namespace BaseData.DomainLib.AggregatesModel.MaterialCategoryAggregate
{
    public class MaterialCategory : AuditableAggregateRoot<int>
    {
        public string? Code { get; set; }

        public string? Name { get; set; }

        public int? ParentId { get; set; }

        public int? Sort { get; set; }

        public string? Description { get; set; }

        public MaterialCategory()
        {
        }

        public MaterialCategory(string? code, string? name, int? parentId,
            int? sort, string? description) : this()
        {
            Code = code;
            Name = name;
            ParentId = parentId;
            Sort = sort;
            Description = description;
        }

        public void Update(string? name, int? parentId,
            int? sort, string? description)
        {
            Name = name;
            ParentId = parentId;
            Sort = sort;
            Description = description;
        }
    }
}